package demo.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import demo.dao.IAdminDao;
import demo.dto.AdminDTO;
import demo.model.Admin;

@RestController
@RequestMapping("admin")
public class AdminController {
	@Resource
	private IAdminDao dao;
	
	@RequestMapping("jinyong.do")
	public int jinyong(Integer id){
		return dao.jinyong(id);
		
	}
	@RequestMapping("jiejin.do")
	public int jiejin(Integer id){
		return dao.jiejin(id);
		
	}
	@RequestMapping("login.do")
	public Admin login(Admin a){
		//管理员登陆
		return dao.login(a);
		
	}
	@RequestMapping("editPass.do")
	public int editPass(AdminDTO dto) {
		return dao.editPass(dto);
	}
	
}
